package com.gengao.springbootcase.config;


import com.gengao.springbootcase.service.DeptService;
import org.dom4j.io.SAXReader;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Configuration
public class CommonConfig {
    @Bean
    @Scope("prototype")
    public SAXReader saxReader(DeptService deptService){
        System.out.println(deptService);//依赖注入  直接放在形参里
        return new SAXReader();
    }
}
